package com.ecoolex.chinadutyfree.retailer.entity;

import com.ecoolex.framework.common.annotation.Description;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import org.springframework.lang.NonNull;

/**
 *
 *   直邮商品订单详情<br>
 *<br>
 * 数据表： direct_mail_goods_order_detail
 *
 */
@Description({"直邮商品订单详情"})
public class DirectMailGoodsOrderDetail implements Serializable {
    /**
     *
     *   主键    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.DetailId
     */
    @Description({"主键", "不能为空", "数据长度: 10"})
    @NonNull
    private Integer detailId;

    /**
     *
     *   订单Id    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.OrderId
     */
    @Description({"订单Id", "不能为空", "数据长度: 10"})
    @NonNull
    private Integer orderId;

    /**
     *
     *   商品Id    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.GoodsId
     */
    @Description({"商品Id", "不能为空", "数据长度: 10"})
    @NonNull
    private Integer goodsId;

    /**
     *
     *   直邮商品    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.DirectMailGoodsId
     */
    @Description({"直邮商品", "不能为空", "数据长度: 10"})
    @NonNull
    private Integer directMailGoodsId;

    /**
     *
     *   产品Id    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.ProductId
     */
    @Description({"产品Id", "不能为空", "数据长度: 10"})
    @NonNull
    private Integer productId;

    /**
     *
     *   直邮产品    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.DirectMailProductId
     */
    @Description({"直邮产品", "不能为空", "数据长度: 10"})
    @NonNull
    private Integer directMailProductId;

    /**
     *
     *   商品名称    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.Name
     */
    @Description({"商品名称", "不能为空", "数据长度: 400"})
    @NonNull
    private String name;

    /**
     *
     *   规格名称, 多规格的名称数组    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.SpecNames
     */
    @Description({"规格名称, 多规格的名称数组", "不能为空", "数据长度: 255"})
    @NonNull
    private String specNames;

    /**
     *
     *   商品展示图; 产品图片或者商品图片    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.Image
     */
    @Description({"商品展示图; 产品图片或者商品图片", "不能为空", "数据长度: 200"})
    @NonNull
    private String image;

    /**
     *
     *   购买数量    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.BuyNumber
     */
    @Description({"购买数量", "不能为空", "数据长度: 10"})
    @NonNull
    private Integer buyNumber;

    /**
     *
     *   零售价格    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.RetailPrice
     */
    @Description({"零售价格", "不能为空", "数据长度: 18"})
    @NonNull
    private BigDecimal retailPrice;

    /**
     *
     *   总价格    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.TotalPrice
     */
    @Description({"总价格", "不能为空", "数据长度: 18"})
    @NonNull
    private BigDecimal totalPrice;

    /**
     *
     *   税率    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.TaxRate
     */
    @Description({"税率", "数据长度: 18"})
    private BigDecimal taxRate;

    /**
     *
     *   税费    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.TaxPrice
     */
    @Description({"税费", "数据长度: 18"})
    private BigDecimal taxPrice;

    /**
     *
     *   运费模板    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.FreightTemplateId
     */
    @Description({"运费模板", "不能为空", "数据长度: 10"})
    @NonNull
    private Integer freightTemplateId;

    /**
     *
     *   发货记录Id    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.ShippedRecordId
     */
    @Description({"发货记录Id", "数据长度: 10"})
    private Integer shippedRecordId;

    public static final Boolean NOT_DELETED = Deleted.NOT_DELETED.value();

    public static final Boolean IS_DELETED = Deleted.IS_DELETED.value();

    /**
     *
     *   逻辑删除    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.Deleted
     */
    @Description({"逻辑删除", "不能为空", "数据长度: 1"})
    @NonNull
    private Boolean deleted;

    /**
     *
     *   创建用户    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.CreateUser
     */
    @Description({"创建用户", "不能为空", "数据长度: 50"})
    @NonNull
    private String createUser;

    /**
     *
     *   创建时间    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.CreateTime
     */
    @Description({"创建时间", "不能为空", "数据长度: 26"})
    @NonNull
    private Date createTime;

    /**
     *
     *   修改用户    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.UpdateUser
     */
    @Description({"修改用户", "不能为空", "数据长度: 50"})
    @NonNull
    private String updateUser;

    /**
     *
     *   修改时间    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.UpdateTime
     */
    @Description({"修改时间", "不能为空", "数据长度: 26"})
    @NonNull
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    /**
     * 获取参数<br><br>
     *
     *   主键    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.DetailId
     */
    public Integer getDetailId() {
        return detailId;
    }

    /**
     * 设置参数<br><br>
     *
     *   主键<br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.DetailId
     */
    public void setDetailId(Integer detailId) {
        this.detailId = detailId;
    }

    /**
     * 获取参数<br><br>
     *
     *   订单Id    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.OrderId
     */
    public Integer getOrderId() {
        return orderId;
    }

    /**
     * 设置参数<br><br>
     *
     *   订单Id<br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.OrderId
     */
    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    /**
     * 获取参数<br><br>
     *
     *   商品Id    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.GoodsId
     */
    public Integer getGoodsId() {
        return goodsId;
    }

    /**
     * 设置参数<br><br>
     *
     *   商品Id<br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.GoodsId
     */
    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    /**
     * 获取参数<br><br>
     *
     *   直邮商品    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.DirectMailGoodsId
     */
    public Integer getDirectMailGoodsId() {
        return directMailGoodsId;
    }

    /**
     * 设置参数<br><br>
     *
     *   直邮商品<br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.DirectMailGoodsId
     */
    public void setDirectMailGoodsId(Integer directMailGoodsId) {
        this.directMailGoodsId = directMailGoodsId;
    }

    /**
     * 获取参数<br><br>
     *
     *   产品Id    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.ProductId
     */
    public Integer getProductId() {
        return productId;
    }

    /**
     * 设置参数<br><br>
     *
     *   产品Id<br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.ProductId
     */
    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    /**
     * 获取参数<br><br>
     *
     *   直邮产品    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.DirectMailProductId
     */
    public Integer getDirectMailProductId() {
        return directMailProductId;
    }

    /**
     * 设置参数<br><br>
     *
     *   直邮产品<br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.DirectMailProductId
     */
    public void setDirectMailProductId(Integer directMailProductId) {
        this.directMailProductId = directMailProductId;
    }

    /**
     * 获取参数<br><br>
     *
     *   商品名称    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.Name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置参数<br><br>
     *
     *   商品名称<br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.Name
     */
    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   规格名称, 多规格的名称数组    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.SpecNames
     */
    public String getSpecNames() {
        return specNames;
    }

    /**
     * 设置参数<br><br>
     *
     *   规格名称, 多规格的名称数组<br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.SpecNames
     */
    public void setSpecNames(String specNames) {
        this.specNames = specNames == null ? null : specNames.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   商品展示图; 产品图片或者商品图片    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.Image
     */
    public String getImage() {
        return image;
    }

    /**
     * 设置参数<br><br>
     *
     *   商品展示图; 产品图片或者商品图片<br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.Image
     */
    public void setImage(String image) {
        this.image = image == null ? null : image.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   购买数量    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.BuyNumber
     */
    public Integer getBuyNumber() {
        return buyNumber;
    }

    /**
     * 设置参数<br><br>
     *
     *   购买数量<br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.BuyNumber
     */
    public void setBuyNumber(Integer buyNumber) {
        this.buyNumber = buyNumber;
    }

    /**
     * 获取参数<br><br>
     *
     *   零售价格    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.RetailPrice
     */
    public BigDecimal getRetailPrice() {
        return retailPrice;
    }

    /**
     * 设置参数<br><br>
     *
     *   零售价格<br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.RetailPrice
     */
    public void setRetailPrice(BigDecimal retailPrice) {
        this.retailPrice = retailPrice;
    }

    /**
     * 获取参数<br><br>
     *
     *   总价格    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.TotalPrice
     */
    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    /**
     * 设置参数<br><br>
     *
     *   总价格<br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.TotalPrice
     */
    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }

    /**
     * 获取参数<br><br>
     *
     *   税率    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.TaxRate
     */
    public BigDecimal getTaxRate() {
        return taxRate;
    }

    /**
     * 设置参数<br><br>
     *
     *   税率<br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.TaxRate
     */
    public void setTaxRate(BigDecimal taxRate) {
        this.taxRate = taxRate;
    }

    /**
     * 获取参数<br><br>
     *
     *   税费    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.TaxPrice
     */
    public BigDecimal getTaxPrice() {
        return taxPrice;
    }

    /**
     * 设置参数<br><br>
     *
     *   税费<br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.TaxPrice
     */
    public void setTaxPrice(BigDecimal taxPrice) {
        this.taxPrice = taxPrice;
    }

    /**
     * 获取参数<br><br>
     *
     *   运费模板    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.FreightTemplateId
     */
    public Integer getFreightTemplateId() {
        return freightTemplateId;
    }

    /**
     * 设置参数<br><br>
     *
     *   运费模板<br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.FreightTemplateId
     */
    public void setFreightTemplateId(Integer freightTemplateId) {
        this.freightTemplateId = freightTemplateId;
    }

    /**
     * 获取参数<br><br>
     *
     *   发货记录Id    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.ShippedRecordId
     */
    public Integer getShippedRecordId() {
        return shippedRecordId;
    }

    /**
     * 设置参数<br><br>
     *
     *   发货记录Id<br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.ShippedRecordId
     */
    public void setShippedRecordId(Integer shippedRecordId) {
        this.shippedRecordId = shippedRecordId;
    }

    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * 获取参数<br><br>
     *
     *   逻辑删除    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.Deleted
     */
    public Boolean getDeleted() {
        return deleted;
    }

    /**
     * 设置参数<br><br>
     *
     *   逻辑删除<br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.Deleted
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    /**
     * 获取参数<br><br>
     *
     *   创建用户    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.CreateUser
     */
    public String getCreateUser() {
        return createUser;
    }

    /**
     * 设置参数<br><br>
     *
     *   创建用户<br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.CreateUser
     */
    public void setCreateUser(String createUser) {
        this.createUser = createUser == null ? null : createUser.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   创建时间    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.CreateTime
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 设置参数<br><br>
     *
     *   创建时间<br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.CreateTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取参数<br><br>
     *
     *   修改用户    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.UpdateUser
     */
    public String getUpdateUser() {
        return updateUser;
    }

    /**
     * 设置参数<br><br>
     *
     *   修改用户<br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.UpdateUser
     */
    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser == null ? null : updateUser.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   修改时间    <br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.UpdateTime
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置参数<br><br>
     *
     *   修改时间<br>
     *<br>
     * 字段名： direct_mail_goods_order_detail.UpdateTime
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public enum Deleted {
        NOT_DELETED(new Boolean("false"), "未删除"),
        IS_DELETED(new Boolean("true"), "已删除");

        private final Boolean value;

        private final String name;

        Deleted(Boolean value, String name) {
            this.value = value;
            this.name = name;
        }

        public Boolean getValue() {
            return this.value;
        }

        public Boolean value() {
            return this.value;
        }

        public String getName() {
            return this.name;
        }
    }

    public enum Column {
        detailId("DetailId", "detailId", "INTEGER", false),
        orderId("OrderId", "orderId", "INTEGER", false),
        goodsId("GoodsId", "goodsId", "INTEGER", false),
        directMailGoodsId("DirectMailGoodsId", "directMailGoodsId", "INTEGER", false),
        productId("ProductId", "productId", "INTEGER", false),
        directMailProductId("DirectMailProductId", "directMailProductId", "INTEGER", false),
        name("Name", "name", "VARCHAR", true),
        specNames("SpecNames", "specNames", "VARCHAR", false),
        image("Image", "image", "VARCHAR", false),
        buyNumber("BuyNumber", "buyNumber", "INTEGER", false),
        retailPrice("RetailPrice", "retailPrice", "DECIMAL", false),
        totalPrice("TotalPrice", "totalPrice", "DECIMAL", false),
        taxRate("TaxRate", "taxRate", "DECIMAL", false),
        taxPrice("TaxPrice", "taxPrice", "DECIMAL", false),
        freightTemplateId("FreightTemplateId", "freightTemplateId", "INTEGER", false),
        shippedRecordId("ShippedRecordId", "shippedRecordId", "INTEGER", false),
        deleted("Deleted", "deleted", "BIT", false),
        createUser("CreateUser", "createUser", "VARCHAR", true),
        createTime("CreateTime", "createTime", "TIMESTAMP", false),
        updateUser("UpdateUser", "updateUser", "VARCHAR", false),
        updateTime("UpdateTime", "updateTime", "TIMESTAMP", false);

        private static final String BEGINNING_DELIMITER = "`";

        private static final String ENDING_DELIMITER = "`";

        private final String column;

        private final boolean isColumnNameDelimited;

        private final String javaProperty;

        private final String jdbcType;

        public String value() {
            return this.column;
        }

        public String getValue() {
            return this.column;
        }

        public String getJavaProperty() {
            return this.javaProperty;
        }

        public String getJdbcType() {
            return this.jdbcType;
        }

        Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
            this.column = column;
            this.javaProperty = javaProperty;
            this.jdbcType = jdbcType;
            this.isColumnNameDelimited = isColumnNameDelimited;
        }

        public String desc() {
            return this.getEscapedColumnName() + " DESC";
        }

        public String asc() {
            return this.getEscapedColumnName() + " ASC";
        }

        public static Column[] excludes(Column ... excludes) {
            ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
            if (excludes != null && excludes.length > 0) {
                columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
            }
            return columns.toArray(new Column[]{});
        }

        public String getEscapedColumnName() {
            if (this.isColumnNameDelimited) {
                return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
            } else {
                return this.column;
            }
        }
    }
}